﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/AdminMaster.master" ValidateRequest="false" CodeFile="JobSeekerAdminer.aspx.cs" Inherits="admin_JobSeekerAdminer" %>

<%@ Register Assembly="DotNetTextBox" Namespace="DotNetTextBox" TagPrefix="DNTB" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="AdminRight">
    <div class="rightHeader1">
        <div class="rightHLeft"><span class="rightHeaderTitle">当前位置</span></div>
        <div class="rightHMiddle2">
            <span>
                <a href="Default.aspx" class="moreRight" style="float: left;">首页</a> <span class="jian">></span>
                <a href="LWMakeAdm.aspx" class="moreRight" style="float: left;">论文</a>
            </span>
        </div>
        <div class="rightHRight"></div>
    </div>
    <div style="margin-top: 10px; border: 1px solid #dddddd; width: 766px;">
        <div style="width: 740px; height: auto; overflow: hidden; margin-left: 20px; padding-top: 10px;">
            <div style="float: left;">
                <asp:FormView ID="FormView1" runat="server" DataKeyNames="jscid" Width="300px" GridLines="none" BorderWidth="1px"
                    DataSourceID="SqlDataSource1" DefaultMode="Insert" CellPadding="4"
                    ForeColor="#333333">
                    <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
                    <RowStyle BackColor="White" ForeColor="#333333" />
                    <EditItemTemplate>
                        jscid:
                <asp:Label ID="jscidLabel1" runat="server" Text='<%# Eval("jscid") %>' />
                        <br />
                        jscname:
                <asp:TextBox ID="jscnameTextBox" runat="server" Text='<%# Bind("jscname") %>' />
                        <br />
                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
                            CommandName="Update" Text="更新" />
                        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
                            CausesValidation="False" CommandName="Cancel" Text="取消" />
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        新类别：&nbsp;<asp:TextBox ID="jscnameTextBox" runat="server"
                            Text='<%# Bind("jscname") %>' />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                            ControlToValidate="jscnameTextBox" ErrorMessage="*"></asp:RequiredFieldValidator>
                        <br />
                        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
                            CommandName="Insert" Text="插入" />
                        &nbsp;
                    </InsertItemTemplate>
                    <ItemTemplate>
                        jscid:
                <asp:Label ID="jscidLabel" runat="server" Text='<%# Eval("jscid") %>' />
                        <br />
                        jscname:
                <asp:Label ID="jscnameLabel" runat="server" Text='<%# Bind("jscname") %>' />
                        <br />
                        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
                            CommandName="Edit" Text="编辑" />
                        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
                            CommandName="Delete" Text="删除" />
                        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
                            CommandName="New" Text="新建" />
                    </ItemTemplate>
                    <InsertRowStyle BackColor="#ffffff" />
                    <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
                    <HeaderTemplate>
                        添加求职指导类别
                    </HeaderTemplate>
                    <EditRowStyle BackColor="#7C6F57" />
                </asp:FormView>
            </div>
            <div style="float: left; margin-left: 60px;">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" Width="300px" GridLines="none" BorderWidth="1px"
                    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="jscid"
                    DataSourceID="SqlDataSource3" OnRowDeleting="GridView1_RowDeleting"
                    PageSize="5">
                    <FooterStyle BackColor="#1f93e0" ForeColor="#333333" />
                    <RowStyle BackColor="White" ForeColor="#333333" />
                    <PagerStyle BackColor="#1f93e0" ForeColor="#FFFFFF" HorizontalAlign="Center" />
                    <Columns>
                        <asp:BoundField DataField="jscname" HeaderText="类名" SortExpression="jscname" />
                        <asp:TemplateField ShowHeader="False">
                            <EditItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"
                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                                    CommandName="Edit" Text="编辑"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                    CommandName="Delete" OnClientClick='return window.confirm("确认删除！");'
                                    Text="删除"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#1f93e0" Font-Bold="True" ForeColor="#FFFFFF" />
                </asp:GridView>
            </div>
        </div>
        <div style="width: 740px; margin-left: 20px; margin-top: 20px;">
            <asp:FormView ID="FormView2" runat="server" DataKeyNames="jsid"
                DataSourceID="SqlDataSource2" AllowPaging="True"
                BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
                CellPadding="2" ForeColor="Black" OnDataBound="FormView2_DataBound">
                <FooterStyle BackColor="Tan" />
                <EditItemTemplate>
                    标题:
                <asp:TextBox ID="jsnameTextBox" runat="server" Text='<%# Bind("jsname") %>' />
                    <br />
                    <DNTB:WebEditor ID="WebEditor1" runat="server" AdjustSize="50"
                        BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                        CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                        CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                        EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                        QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                        QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                        RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                        systemFolder="system_dntb/" Text='<%# Bind("jsinfo") %>' ToolBarColor="#EFEFEF"
                        ToolBarHeight="50px" Width="555px" />
                    分类：<asp:DropDownList ID="DropDownList2" runat="server"
                        DataSourceID="SqlDataSource1" DataTextField="jscname" DataValueField="jscid"
                        SelectedValue='<%# Bind("jscid") %>'>
                    </asp:DropDownList>
                    <br />
                    <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
                        CommandName="Update" Text="更新" />
                    &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
                        CausesValidation="False" CommandName="Cancel" Text="取消" />
                </EditItemTemplate>
                <InsertItemTemplate>
                    标题:
                <asp:TextBox ID="jsnameTextBox" runat="server" Text='<%# Bind("jsname") %>' />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                        ControlToValidate="jsnameTextBox" ErrorMessage="*" ValidationGroup="1"></asp:RequiredFieldValidator>
                    <br />
                    <DNTB:WebEditor ID="WebEditor2" runat="server" AdjustSize="50"
                        BackColor="White" BorderColor="#DDDDDD" BorderWidth="0px"
                        CodeBackColor="#E8F4FF" CodeBorder="1px" CodeBorderColor="#6595D6"
                        CodeBorderStyle="Dotted" CodeTitle="以下是代码片段：" EditBorderColor="#CDCDD3"
                        EditHeight="210px" Height="280px" LeftAreaAlign="center" LeftAreaWidth="36%"
                        QuoteBackColor="#E8F4FF" QuoteBorder="1px" QuoteBorderColor="#6595D6"
                        QuoteBorderStyle="Dotted" QuoteTitle="以下是引用片段：" RightAreaAlign="center"
                        RightAreaWidth="64%" Shadow="False" StatusHeight="20px"
                        systemFolder="system_dntb/" Text='<%# Bind("jsinfo") %>' ToolBarColor="#EFEFEF"
                        ToolBarHeight="50px" Width="555px" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                        ControlToValidate="WebEditor2" ErrorMessage="文章内容不能为空!" ValidationGroup="1"></asp:RequiredFieldValidator>
                    <br />
                    类别：<asp:DropDownList ID="DropDownList1" runat="server"
                        DataSourceID="SqlDataSource1" DataTextField="jscname" DataValueField="jscid"
                        SelectedValue='<%# Bind("jscid") %>'>
                    </asp:DropDownList>
                    <br />
                    <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
                        CommandName="Insert" Text="插入" ValidationGroup="1" />
                    &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
                        CausesValidation="False" CommandName="Cancel" Text="取消" />
                </InsertItemTemplate>
                <ItemTemplate>
                    标题:
                <asp:Label ID="jsnameLabel" runat="server" Text='<%# Bind("jsname") %>' />
                    <br />
                    <asp:Label ID="jsinfoLabel" runat="server" Text='<%# Bind("jsinfo") %>' />
                    <br />
                    发布时间:
                <asp:Label ID="jstimeLabel" runat="server"
                    Text='<%# Bind("jstime", "{0:d}") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink1" runat="server"
                        NavigateUrl="~/admin/addJobSeekerAdminer.aspx">添加</asp:HyperLink>&nbsp;
                    <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
                        CommandName="Edit" Text="编辑" />
                    &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
                        CommandName="Delete" Text="删除" OnClientClick='return window.confirm("确认删除！")' />
                    &nbsp;
                </ItemTemplate>
                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
                    HorizontalAlign="Center" />
                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            </asp:FormView>
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [jobseekerclass] WHERE [jscid] = @original_jscid"
        InsertCommand="INSERT INTO [jobseekerclass] ([jscname]) VALUES (@jscname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [jobseekerclass]"
        UpdateCommand="UPDATE [jobseekerclass] SET [jscname] = @jscname WHERE [jscid] = @original_jscid AND [jscname] = @original_jscname">
        <DeleteParameters>
            <asp:Parameter Name="original_jscid" Type="Int32" />

        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jscname" Type="String" />
            <asp:Parameter Name="original_jscid" Type="Int32" />
            <asp:Parameter Name="original_jscname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jscname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [jobseeker] WHERE [jsid] = @original_jsid"
        InsertCommand="INSERT INTO [jobseeker] ([jsname], [jsinfo], [jstime], [jscid]) VALUES (@jsname, @jsinfo, getdate(), @jscid)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT jobseeker.jsid AS Expr1, jobseeker.jsname AS Expr2, jobseeker.jsinfo AS Expr3, jobseeker.jstime AS Expr4, jobseeker.jscid AS Expr5, jobseekerclass.jscname, jobseeker.* FROM jobseeker INNER JOIN jobseekerclass ON jobseeker.jscid = jobseekerclass.jscid"
        UpdateCommand="UPDATE [jobseeker] SET [jsname] = @jsname, [jsinfo] = @jsinfo, [jscid] = @jscid WHERE [jsid] = @original_jsid">
        <DeleteParameters>
            <asp:Parameter Name="original_jsid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jscid" Type="Int32" />
            <asp:Parameter Name="original_jsid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jscid" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        InsertCommand="INSERT INTO [jobseekerclass] ([jscname]) VALUES (@jscname)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [jobseekerclass]"
        UpdateCommand="UPDATE [jobseekerclass] SET [jscname] = @jscname WHERE [jscid] = @original_jscid AND [jscname] = @original_jscname">

        <UpdateParameters>
            <asp:Parameter Name="jscname" Type="String" />
            <asp:Parameter Name="original_jscid" Type="Int32" />
            <asp:Parameter Name="original_jscname" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jscname" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:DB_CCXYRCConnectionString %>"
        DeleteCommand="DELETE FROM [jobseeker] WHERE [jsid] = @original_jsid AND [jsname] = @original_jsname AND [jsinfo] = @original_jsinfo AND [jstime] = @original_jstime AND [jscid] = @original_jscid"
        InsertCommand="INSERT INTO [jobseeker] ([jsname], [jsinfo], [jstime], [jscid]) VALUES (@jsname, @jsinfo, @jstime, @jscid)"
        OldValuesParameterFormatString="original_{0}"
        SelectCommand="SELECT * FROM [jobseeker]"
        UpdateCommand="UPDATE [jobseeker] SET [jsname] = @jsname, [jsinfo] = @jsinfo, [jstime] = @jstime, [jscid] = @jscid WHERE [jsid] = @original_jsid AND [jsname] = @original_jsname AND [jsinfo] = @original_jsinfo AND [jstime] = @original_jstime AND [jscid] = @original_jscid">
        <DeleteParameters>
            <asp:Parameter Name="original_jsid" Type="Int32" />
            <asp:Parameter Name="original_jsname" Type="String" />
            <asp:Parameter Name="original_jsinfo" Type="String" />
            <asp:Parameter Name="original_jstime" Type="DateTime" />
            <asp:Parameter Name="original_jscid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jstime" Type="DateTime" />
            <asp:Parameter Name="jscid" Type="Int32" />
            <asp:Parameter Name="original_jsid" Type="Int32" />
            <asp:Parameter Name="original_jsname" Type="String" />
            <asp:Parameter Name="original_jsinfo" Type="String" />
            <asp:Parameter Name="original_jstime" Type="DateTime" />
            <asp:Parameter Name="original_jscid" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jsname" Type="String" />
            <asp:Parameter Name="jsinfo" Type="String" />
            <asp:Parameter Name="jstime" Type="DateTime" />
            <asp:Parameter Name="jscid" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>
